package cn.zhangxinyu.org.mapper;

import cn.zhangxinyu.org.domain.Department;
import cn.zhangxinyu.org.query.DepartmentQuery;

import java.util.List;

//部门的mapper层
public interface DepartmentMapper {

    //查询一条 根据id
    Department loadById(Long id);
    //查询所有
    List<Department> loadAll();
    //新增
    void save(Department department);
    //删除
    void remove(Long id);
    //修改
    void update(Department department);


    //分页1：查询总条数
    Long queryCount(DepartmentQuery query);
    //分页2：查询当前页的数据
    List<Department>queryData(DepartmentQuery query);
}
